Determine if an attribute has an applied font

I am trying to determine if an object in DOORS has an applied font to it. There are numerous boolean properties to determine if a string (richtext) is underlined, bold etc however there are none that determine if a font is applied to a given attribute/column. Anyone have a solution to this?

In my case I want to determine if object heading and object text are in Courier new font since some objects are and some objects are not since I wanted to preserve fixed length formatting for specific objects.

Thanks
PatrickGuay - Wed Nov 02 10:12:18 EDT 2011

Re: Determine if an attribute has an applied font
llandale - Wed Nov 02 17:11:01 EDT 2011

There is not font as far as I can tell. The displayed font is a function of your options, and that text may look different for someone else with different default font options.

Re: Determine if an attribute has an applied font
Mathias Mamsch - Wed Nov 02 21:01:42 EDT 2011

Well this can be complicated. Do you want to:
  • check if the font is used at all in the richText
  • check if the entire text is formatted with the font
  • or just see whether or not the font appears in the font table of the richtext, regardless whether it is used

In any case you would need to extract the font table from the richtext, then search for the font and its index. That is the easy part. To check consistently if the entire text is formatted in the font is pretty hard to do. To check whether the font is used in the text is easier, but you still need to do some complex search differentiating the font keyword (like \f1) from other text like (\\f1, \f10, here\f1, etc.)

Maybe that helps, regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS